package com.olympia.myapp.util;

import android.content.Context;
import android.content.SharedPreferences;

public class Settings {

	public static String KEY_MAIL = "mail";
	public static String KEY_PASS= "pass";

	public static void savePlayer(Context context, String mail, String pass) {
		try {
			SharedPreferences settings = context.getSharedPreferences("PLAYER",
					0);
			SharedPreferences.Editor editor = settings.edit();
			editor.putString(KEY_MAIL, mail);
			editor.putString(KEY_PASS, pass);

			editor.commit();
		} catch (Exception e) {
		}
	}

	public static String[] getpPlayer(Context context) {
		SharedPreferences settings = context.getSharedPreferences("PLAYER", 0);
		String mail = settings.getString(KEY_MAIL, "");
		String pass = settings.getString(KEY_PASS, "");
		return new String[]{mail, pass};
	}

}
